About The Java Technology
The Java Programming Language
-
Java programming language is a high level language, there are many buzzwords to characterize this powerful programming language
-
To understand why we use those buzzwords to describe Java programming --> let's go to this link The Java Language Environment - help to explain each buzzwords above.
-
The most feature of Java programming when it was first came out is the ability to "Write Once Run Anywhere - WORA" --> Let's capture this concept:
- In the Java programming language, all source code is first written in plaint text files ending with the ".java" extension
- Those source files are then compiled by the "Javac compiler" into ".class" files
- ".class" files - a kind of file that contains the "Java bytecode" - but does not contain code that is native to your computer processor (CPU) for executing directly which compares to the compiler of C language. This file is designed to be actually executed/read by a JVM (Java Virtual Machine) in the machine-level language of JVM.
An overview of the software development process
- The JVM is compatible with multiple operating systems, which means that the same ".class" files can be executed on various platforms such as Microsoft Windows, Solaris OS, Linux, or Mac OS.
- There are some certain virtual machines, like Java SE HotSpot at a Glance , take extra measures during runtime to enhance the performance of your application. This involves actions like identifying performance limitations and frequently recompiling heavily used code sections into native code for improved efficiency.
💡Note- The JVM is dependent on the operating system, with specific versions tailored for different OSs.
- For instance, using Mac OS X requires a distinct JVM compared to using Windows or another OS.
- For achieving "Platform-independent" functionality --> it is crucial to download the appropriate JVM version compatible with your OS.
The Java Platform
- A platform is the hardware or software environment - a place in which a program runs. Also there are most platforms can be described as a combination of the operating system and underlying hardware.
- Some of the most popular platforms like Microsoft Windows, Linux, Solaris OS and Mac OS.
- But come to the Java platform, it differs from most other platforms in that it's a software-only platform that runs on top of other hardware-based platforms.
- The Java platform has two components:
- The Java Virtual Machine
- JVM (Java virtual machine) - is the base for the Java platform and is ported onto various hardware-based platforms (meaning: many kinds of JVM which is design for different OSs).
- The Java Application Programming Interface (API)
- The API is a large collection of ready-made software components that provide many useful capabilities.
- It is grouped into the "Libraries of related classed and interfaces" - known as "packages".
- The Java Virtual Machine
Disadvantages of Java Technology
- As a platform-independent environment - the Java platform can be a bit slower than native code. However, with advanced compiler and virtual machine technologies --> give the performance close to that of native code without threatening portability.